﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
  x:Class="System.Windows.Controls.Samples.GridSplitterSample">
    <StackPanel>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            
            <Grid Grid.Row="1" Grid.Column="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100" />
                    <ColumnDefinition Width="5" />
                    <ColumnDefinition Width="100" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="100" />
                    <RowDefinition Height="5" />
                    <RowDefinition Height="100" />
                </Grid.RowDefinitions>
                
                <Rectangle Grid.Row="0" Grid.Column="0" Fill="Red"/>
                <Rectangle Grid.Row="0" Grid.Column="2" Fill="Green" />
                <Rectangle Grid.Row="2" Grid.Column="0" Fill="Blue" />
                <Rectangle Grid.Row="2" Grid.Column="2" Fill="Yellow" />
                
                <controls:GridSplitter
                  Grid.Row="1"
                  Grid.Column="0"
                  Grid.ColumnSpan="3"
                  HorizontalAlignment="Stretch"
                  VerticalAlignment="Stretch" />
                <controls:GridSplitter
                  Grid.Row="0"
                  Grid.Column="1"
                  Grid.RowSpan="3"
                  HorizontalAlignment="Stretch"
                  VerticalAlignment="Stretch" />
            </Grid>
            
            <Grid Grid.Row="1" Grid.Column="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100" />
                    <ColumnDefinition Width="5" />
                    <ColumnDefinition Width="100" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="100" />
                    <RowDefinition Height="5" />
                    <RowDefinition Height="100" />
                </Grid.RowDefinitions>
                
                <Rectangle Grid.Row="0" Grid.Column="0" Fill="Red"/>
                <Rectangle Grid.Row="0" Grid.Column="2" Fill="Green" />
                <Rectangle Grid.Row="2" Grid.Column="0" Fill="Blue" />
                <Rectangle Grid.Row="2" Grid.Column="2" Fill="Yellow" />
                
                <controls:GridSplitter
                  Grid.Row="1"
                  Grid.Column="0"
                  Grid.ColumnSpan="3"
                  HorizontalAlignment="Stretch"
                  VerticalAlignment="Stretch"
                  ShowsPreview="True" />
                <controls:GridSplitter
                  Grid.Row="0"
                  Grid.Column="1"
                  Grid.RowSpan="3"
                  HorizontalAlignment="Stretch"
                  VerticalAlignment="Stretch"
                  ShowsPreview="True" />
            </Grid>
        </Grid>
        <src:SourceViewer xmlns:src="clr-namespace:System.Windows.Controls.Samples;assembly=System.Windows.Controls.Samples.Common" xmlns:sys="clr-namespace:System;assembly=mscorlib">
  <src:SourceFile Path="GridSplitterSample.xaml">
    <src:SourceFile.Source>
      <sys:String>&lt;!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
--&gt;

&lt;UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
  x:Class="System.Windows.Controls.Samples.GridSplitterSample"&gt;
    &lt;StackPanel&gt;
        &lt;Grid&gt;
            &lt;Grid.ColumnDefinitions&gt;
                &lt;ColumnDefinition Width="*" /&gt;
                &lt;ColumnDefinition Width="*" /&gt;
            &lt;/Grid.ColumnDefinitions&gt;
            
            &lt;Grid Grid.Row="1" Grid.Column="0"&gt;
                &lt;Grid.ColumnDefinitions&gt;
                    &lt;ColumnDefinition Width="100" /&gt;
                    &lt;ColumnDefinition Width="5" /&gt;
                    &lt;ColumnDefinition Width="100" /&gt;
                &lt;/Grid.ColumnDefinitions&gt;
                &lt;Grid.RowDefinitions&gt;
                    &lt;RowDefinition Height="100" /&gt;
                    &lt;RowDefinition Height="5" /&gt;
                    &lt;RowDefinition Height="100" /&gt;
                &lt;/Grid.RowDefinitions&gt;
                
                &lt;Rectangle Grid.Row="0" Grid.Column="0" Fill="Red"/&gt;
                &lt;Rectangle Grid.Row="0" Grid.Column="2" Fill="Green" /&gt;
                &lt;Rectangle Grid.Row="2" Grid.Column="0" Fill="Blue" /&gt;
                &lt;Rectangle Grid.Row="2" Grid.Column="2" Fill="Yellow" /&gt;
                
                &lt;controls:GridSplitter
                  Grid.Row="1"
                  Grid.Column="0"
                  Grid.ColumnSpan="3"
                  HorizontalAlignment="Stretch"
                  VerticalAlignment="Stretch" /&gt;
                &lt;controls:GridSplitter
                  Grid.Row="0"
                  Grid.Column="1"
                  Grid.RowSpan="3"
                  HorizontalAlignment="Stretch"
                  VerticalAlignment="Stretch" /&gt;
            &lt;/Grid&gt;
            
            &lt;Grid Grid.Row="1" Grid.Column="2"&gt;
                &lt;Grid.ColumnDefinitions&gt;
                    &lt;ColumnDefinition Width="100" /&gt;
                    &lt;ColumnDefinition Width="5" /&gt;
                    &lt;ColumnDefinition Width="100" /&gt;
                &lt;/Grid.ColumnDefinitions&gt;
                &lt;Grid.RowDefinitions&gt;
                    &lt;RowDefinition Height="100" /&gt;
                    &lt;RowDefinition Height="5" /&gt;
                    &lt;RowDefinition Height="100" /&gt;
                &lt;/Grid.RowDefinitions&gt;
                
                &lt;Rectangle Grid.Row="0" Grid.Column="0" Fill="Red"/&gt;
                &lt;Rectangle Grid.Row="0" Grid.Column="2" Fill="Green" /&gt;
                &lt;Rectangle Grid.Row="2" Grid.Column="0" Fill="Blue" /&gt;
                &lt;Rectangle Grid.Row="2" Grid.Column="2" Fill="Yellow" /&gt;
                
                &lt;controls:GridSplitter
                  Grid.Row="1"
                  Grid.Column="0"
                  Grid.ColumnSpan="3"
                  HorizontalAlignment="Stretch"
                  VerticalAlignment="Stretch"
                  ShowsPreview="True" /&gt;
                &lt;controls:GridSplitter
                  Grid.Row="0"
                  Grid.Column="1"
                  Grid.RowSpan="3"
                  HorizontalAlignment="Stretch"
                  VerticalAlignment="Stretch"
                  ShowsPreview="True" /&gt;
            &lt;/Grid&gt;
        &lt;/Grid&gt;
    &lt;/StackPanel&gt;
&lt;/UserControl&gt;</sys:String>
    </src:SourceFile.Source>
  </src:SourceFile>
  <src:SourceFile Path="GridSplitterSample.xaml.cs">
    <src:SourceFile.Source>
      <sys:String>// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System;
using System.ComponentModel;

namespace System.Windows.Controls.Samples
{
    /// &lt;summary&gt;
    /// Sample page demonstrating the GridSplitter.
    /// &lt;/summary&gt;
    [Sample("GridSplitter", DifficultyLevel.Basic)]
    [Category("GridSplitter")]
    public partial class GridSplitterSample : UserControl
    {
        /// &lt;summary&gt;
        /// Initializes a new instance of the DatePickerSample class.
        /// &lt;/summary&gt;
        public GridSplitterSample()
        {
            InitializeComponent();
        }
    }
}</sys:String>
    </src:SourceFile.Source>
  </src:SourceFile>
  <src:SourceFile Path="GridSplitterSample.xaml.vb">
    <src:SourceFile.Source>
      <sys:String>' (c) Copyright Microsoft Corporation.
' This source is subject to the Microsoft Public License (Ms-PL).
' Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
' All other rights reserved.

Imports Microsoft.VisualBasic
Imports System
Imports System.ComponentModel

''' &lt;summary&gt;
''' Sample page demonstrating the GridSplitter.
''' &lt;/summary&gt;
&lt;Sample("GridSplitter", DifficultyLevel.Basic), Category("GridSplitter")&gt; _
Partial Public Class GridSplitterSample
    Inherits UserControl
    ''' &lt;summary&gt;
    ''' Initializes a new instance of the DatePickerSample class.
    ''' &lt;/summary&gt;
    Public Sub New()
        InitializeComponent()
    End Sub
End Class</sys:String>
    </src:SourceFile.Source>
  </src:SourceFile>
</src:SourceViewer>
    </StackPanel>
</UserControl>